<div class="accounts view">
    <h2><?php __('Account'); ?></h2>
    <dl><?php $i = 0;
$class = ' class="altrow"'; ?>
        <dt<?php if ($i % 2 == 0)
    echo $class; ?>><?php __('Id'); ?></dt>
        <dd<?php if ($i++ % 2 == 0)
                echo $class; ?>>
<?php echo $account['Account']['id']; ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0)
    echo $class; ?>><?php __('User'); ?></dt>
        <dd<?php if ($i++ % 2 == 0)
    echo $class; ?>>
            <?php echo $this->Html->link($account['User']['name'], array('controller' => 'users', 'action' => 'view', $account['User']['id'])); ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0)
                echo $class; ?>><?php __('Name'); ?></dt>
        <dd<?php if ($i++ % 2 == 0)
                echo $class; ?>>
<?php echo $account['Account']['name']; ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0)
    echo $class; ?>><?php __('Account Number'); ?></dt>
        <dd<?php if ($i++ % 2 == 0)
            echo $class; ?>>
<?php echo $account['Account']['account_number']; ?>
            &nbsp;
        </dd>
    </dl>
    <div class="related">
        <h3><?php __('Related Regular Transactions'); ?></h3>
<?php if (!empty($account['RegularTransaction'])): ?>
            <table cellpadding = "0" cellspacing = "0">
                <tr>
                    <th><?php __('Id'); ?></th>
                    <th><?php __('User Id'); ?></th>
                    <th><?php __('Account Id'); ?></th>
                    <th><?php __('Interval'); ?></th>
                    <th><?php __('Delay'); ?></th>
                    <th><?php __('Name'); ?></th>
                    <th><?php __('Amount'); ?></th>
                    <th class="actions"><?php __('Actions'); ?></th>
                </tr>
    <?php
    $i = 0;
    foreach ($account['RegularTransaction'] as $regularTransaction):
        $class = null;
        if ($i++ % 2 == 0) {
            $class = ' class="altrow"';
        }
        ?>
                    <tr<?php echo $class; ?>>
                        <td><?php echo $regularTransaction['id']; ?></td>
                        <td><?php echo $regularTransaction['user_id']; ?></td>
                        <td><?php echo $regularTransaction['account_id']; ?></td>
                        <td><?php echo $regularTransaction['interval']; ?></td>
                        <td><?php echo $regularTransaction['delay']; ?></td>
                        <td><?php echo $regularTransaction['name']; ?></td>
                        <td><?php echo $regularTransaction['amount']; ?></td>
                        <td class="actions">
        <?php echo $this->Html->link(__('View', true), array('controller' => 'regular_transactions', 'action' => 'view', $regularTransaction['id'])); ?>
        <?php echo $this->Html->link(__('Edit', true), array('controller' => 'regular_transactions', 'action' => 'edit', $regularTransaction['id'])); ?>
        <?php echo $this->Html->link(__('Delete', true), array('controller' => 'regular_transactions', 'action' => 'delete', $regularTransaction['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $regularTransaction['id'])); ?>
                        </td>
                    </tr>
    <?php endforeach; ?>
            </table>
        <?php endif; ?>

        <div class="actions">
            <ul>
                <li><?php echo $this->Html->link(__('New Regular Transaction', true), array('controller' => 'regular_transactions', 'action' => 'add')); ?> </li>
            </ul>
        </div>
    </div>
    <div class="related">
        <h3><?php __('Related Transactions'); ?></h3>
<?php if (!empty($account['Transaction'])): ?>
            <table cellpadding = "0" cellspacing = "0">
                <tr>
                    <th><?php __('Id'); ?></th>
                    <th><?php __('User Id'); ?></th>
                    <th><?php __('Account Id'); ?></th>
                    <th><?php __('Name'); ?></th>
                    <th><?php __('Amount'); ?></th>
                    <th><?php __('Verified'); ?></th>
                    <th><?php __('Created'); ?></th>
                    <th><?php __('Updated'); ?></th>
                    <th><?php __('Regular Transaction Id'); ?></th>
                    <th><?php __('Post Date'); ?></th>
                    <th class="actions"><?php __('Actions'); ?></th>
                </tr>
    <?php
    $i = 0;
    foreach ($account['Transaction'] as $transaction):
        $class = null;
        if ($i++ % 2 == 0) {
            $class = ' class="altrow"';
        }
        ?>
                    <tr<?php echo $class; ?>>
                        <td><?php echo $transaction['id']; ?></td>
                        <td><?php echo $transaction['user_id']; ?></td>
                        <td><?php echo $transaction['account_id']; ?></td>
                        <td><?php echo $transaction['name']; ?></td>
                        <td><?php echo $transaction['amount']; ?></td>
                        <td><?php echo $transaction['verified']; ?></td>
                        <td><?php echo $transaction['created']; ?></td>
                        <td><?php echo $transaction['updated']; ?></td>
                        <td><?php echo $transaction['regular_transaction_id']; ?></td>
                        <td><?php echo $transaction['post_date']; ?></td>
                        <td class="actions">
        <?php echo $this->Html->link(__('View', true), array('controller' => 'transactions', 'action' => 'view', $transaction['id'])); ?>
        <?php echo $this->Html->link(__('Edit', true), array('controller' => 'transactions', 'action' => 'edit', $transaction['id'])); ?>
        <?php echo $this->Html->link(__('Delete', true), array('controller' => 'transactions', 'action' => 'delete', $transaction['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $transaction['id'])); ?>
                        </td>
                    </tr>
    <?php endforeach; ?>
            </table>
        <?php endif; ?>

        <div class="actions">
            <ul>
                <li><?php echo $this->Html->link(__('New Transaction', true), array('controller' => 'transactions', 'action' => 'add')); ?> </li>
            </ul>
        </div>
    </div>
    <div class="related">
        <h3><?php __('Related Totals'); ?></h3>
            <?php if (!empty($account['Total'])): ?>
            <table cellpadding = "0" cellspacing = "0">
                <tr>
                    <th><?php __('Id'); ?></th>
                    <th><?php __('Account Id'); ?></th>
                    <th><?php __('Balance'); ?></th>
                    <th><?php __('Created'); ?></th>
                    <th><?php __('Post Date'); ?></th>
                    <th class="actions"><?php __('Actions'); ?></th>
                </tr>
    <?php
    $i = 0;
    foreach ($account['Total'] as $total):
        $class = null;
        if ($i++ % 2 == 0) {
            $class = ' class="altrow"';
        }
        ?>
                    <tr<?php echo $class; ?>>
                        <td><?php echo $total['id']; ?></td>
                        <td><?php echo $total['account_id']; ?></td>
                        <td><?php echo $total['balance']; ?></td>
                        <td><?php echo $total['created']; ?></td>
                        <td><?php echo $total['post_date']; ?></td>
                        <td class="actions">
        <?php echo $this->Html->link(__('View', true), array('controller' => 'totals', 'action' => 'view', $total['id'])); ?>
        <?php echo $this->Html->link(__('Edit', true), array('controller' => 'totals', 'action' => 'edit', $total['id'])); ?>
        <?php echo $this->Html->link(__('Delete', true), array('controller' => 'totals', 'action' => 'delete', $total['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $total['id'])); ?>
                        </td>
                    </tr>
    <?php endforeach; ?>
            </table>
<?php endif; ?>
    </div>

</div>